package com.qbkj.base_lib;

import android.os.Build;
import android.os.StrictMode;

import com.bumptech.glide.request.target.ViewTarget;
import com.zhy.autolayout.config.AutoLayoutConifg;


/**
 * Created by St on 2018/3/19.
 */

public abstract class Application extends android.app.Application {
    private static Application instance;

    @Override
    public void onCreate() {
        super.onCreate();
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
            // android 7.0系统解决拍照的问题
            StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder();
            StrictMode.setVmPolicy(builder.build());
            builder.detectFileUriExposure();
        }
        AutoLayoutConifg.getInstance().useDeviceSize();
        ViewTarget.setTagId(R.id.glide_tag_id);
        instance = this;
    }

    public static Application getInstance() {
        return instance;
    }

}
